package com.bailiban.entity;


import java.io.Serializable;
import java.util.List;

/**
 * (Users)实体类
 *
 * @author zhulang
 * @since 2020-11-02 09:01:55
 */
public class Users implements Serializable {
    private static final long serialVersionUID = -39837085074640292L;

    private Integer id;
    /**
     * 邮箱
     */
    private String email;
    /**
     * 用户名
     */
    private String username;
    /**
     * 密码（加密）
     */
    private String password;
    /**
     * 电话
     */
    private String phonenum;
    /**
     * 状态0未开启 1 开启
     */
    private Integer status;
    private String statusStr;
    private List<Role> roles;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPhonenum() {
        return phonenum;
    }

    public void setPhonenum(String phonenum) {
        this.phonenum = phonenum;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getStatusStr() {
//        状态0未开启 1 开启
        if (this.status == 0) {
            this.statusStr = "未开启";
        } else if (this.status == 1) {
            this.statusStr = "开启";
        } else {
            this.statusStr = "未知状态";
        }
        return statusStr;
    }

    public void setStatusStr(String statusStr) {
        this.statusStr = statusStr;
    }

    public List<Role> getRoles() {
        return roles;
    }

    public void setRoles(List<Role> roles) {
        this.roles = roles;
    }
}